import request from '@/utils/request'

// 查询某测点最后一包日期
export function getLastDate(pointCode) {
    return request({
        url: '/raw/getLastDate',
        method: 'get',
        params: {
            pointCode: pointCode
        }
    })
}

// 查询某测点某日期下时间序列
export function getTimeList(query) {
    return request({
        url: '/raw/getTimeList',
        method: 'get',
        params: query
    })
}

// 查询测点某时间戳下的波形数
export function getVibRaw(query) {
    return request({
        url: '/raw/getVibRaw',
        method: 'get',
        params: query
    })
}

// 查询测点某时间戳下的FFT数据
export function getVibFFT(query) {
    return request({
        url: '/raw/getVibFFT',
        method: 'get',
        params: query
    })
}
// 查询测点某时间段温度数据
export function queryTemp(query) {
    return request({
        url: '/raw/queryTemp',
        method: 'get',
        params: query
    })
}

// 查询测点某时间段统计数据
export function queryConn(query) {
    return request({
        url: '/raw/queryConn',
        method: 'get',
        params: query
    })
}

// 上传原始数据
export function uploadRaw(data) {
    return request({
        url: '/raw/uploadRaw',
        method: 'post',
        data: data
    })
}

// 删除原始数据
export function deleteRaw(data) {
    return request({
        url: '/raw/deleteRaw',
        method: 'post',
        data: data
    })
}

// 处理进度
export function progress(taskId) {
    return request({
        url: '/raw/progress/' + taskId,
        method: 'get'
    })
}

// 特征值
export function queryFeature(query) {
    return request({
        url: '/raw/queryFeature',
        method: 'get',
        params: query
    })
}
// 查询某传感器当前配置
export function getSensorConfig(deviceCode) {
    return request({
        url: '/raw/getSensorConfig',
        method: 'get',
        params: {
            deviceCode: deviceCode
        }
    })
}